package generator.template;

public class ExcludingGenerator {

	public static String generate(String path, String type, String element, int excludingCounter) {
		return "\n\t\tprivate function excluding"+type+""+excludingCounter+"(colecao:Vector.<"+type+">,elToRemove:"+type+"):Vector.<"+type+">{\n"+
				"\t\t\tvar novo:Vector.<"+type+"> = new Vector.<"+type+">();\n"+
				"\t\t\tfor each (var value:"+type+" in colecao){\n"+
				"\t\t\t\tif(!value.Equals("+element+"){\n"+
				"\t\t\t\t\tnovo.push(value);\n"+
				"\t\t\t\t}\n"+
				"\t\t\t}\n"+
				"\t\t\treturn novo;\n"+
				"\t\t}\n";
	}

}
